

#include "Motor.h"

void Init_pin()
{
  pinMode(3, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
}
void go()
{
  analogWrite(3, Speed);
  analogWrite(5, Speed);
  digitalWrite(6, 0);
  digitalWrite(7, 1);
  digitalWrite(8, 0);
  digitalWrite(9, 1);
}

void trunleft()
{
  analogWrite(3, Speed);
  analogWrite(5, Speed);
  digitalWrite(6, 1);
  digitalWrite(7, 0);
  digitalWrite(8, 0);
  digitalWrite(9, 1);
}

void trunright()
{
  analogWrite(3, Speed);
  analogWrite(5, Speed);
  digitalWrite(6, 0);
  digitalWrite(7, 1);
  digitalWrite(8, 1);
  digitalWrite(9, 0);
}

void goback()
{
  analogWrite(3, Speed);
  analogWrite(5, Speed);
  digitalWrite(6, 1);
  digitalWrite(7, 0);
  digitalWrite(8, 1);
  digitalWrite(9, 0);
}
void stopcar()
{
  analogWrite(3, 0);
  analogWrite(5, 0);
}
